#ifndef CATAPULT_H_INCLUDED
#define CATAPULT_H_INCLUDED

#include "GameObject.h"
#include "EventPoller.h"

class File;

class Catapult : public GameObject, public EventHandler
{
public:
	Catapult();
	~Catapult();
	void Draw();
	void Update();
	bool Load(File* const f);

	bool GetIsWaiting();
	bool GetIsAiming();
	bool GetIsFiring();
	bool GetIsReadyFire();
	bool GetHasFired();
	void HasFired();
	void MakeAiming();
	float GetYRotation();
	void TurnLeft();
	void TurnRight();
	void Fire();
	void SetFiringSpeed(float fire);
	
	const char* GetTypeName();
	virtual void OnKeyboardEvent(const SDL_KeyboardEvent&); 

private:
	bool m_isWaiting;
	bool m_isAiming;
	bool m_isFiring;
	bool m_isReadyFire;
	bool m_hasFired;
	bool m_isReseting;
	bool m_isTurningRight;
	bool m_isTurningLeft;
	float m_yRotation;
	float m_armRotation;
	float m_firingSpeed;
	std::string m_armMeshPath;
	std::string m_baseMeshPath;
	std::string m_texPath;
};

#endif